/**
 * Demo.java is created by Zachariah at 2012-2-16 下午05:59:04
 */
package com.zack.designPattern.strategy;

/**
 * @author zachariah zzcfrog@gmail.com
 *
 */
public class Demo {

	/**
	 *
	 * @author zachariah
	 * @param args
	 */
	public static void main(String[] args) {
		Calculator c = new Calculator(new Adder());
		System.out.println(c.op(3,4));
		
		c.switchStrategy(new Subber());
		System.out.println(c.op(3,4));
	}

}
